<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="manage" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<manage:page title="用户查询">
     <jsp:attribute name="script">
         <script type="text/javascript" src="static-resources/layer/layer.js"></script>
    <script>
        $('.ui.table').DataTable({
            "lengthMenu": [[100, 50, 25, -1], [100, 50, 25, "所有"]],
            "columnDefs": [{"targets": [0,1,4], "orderable": false}],
            "order": [[3, "asc"]]
        });
    </script>
</jsp:attribute>
    <jsp:body>
        <div class="ui container" style="display: block;margin-top: 5px;">
            <br>
            <div class="ui breadcrumb">
                <a class="active section" href="/users.do">用户查询</a>
            </div>
        <div class="ui container">
            <table class="ui striped table">
                <thead>
                <tr>
                    <th>
                        <h4>id</h4>
                    </th>
                    <th>
                        <h4>中台用户id</h4>
                    </th>
                    <th>
                        <h4>昵称</h4>
                    </th>
                    <th>
                        <h4>登录账号</h4>
                    </th>
                    <th>
                        <h4>门店编号</h4>
                    </th>
                    <th>
                        <h4>门店名称</h4>
                    </th>
                    <th>
                        <h4>状态</h4>
                    </th>
                    <th>
                        <h4>操作</h4>
                    </th>
                </tr>
                </thead>
                <c:forEach var="user" items="${users}">
                    <tr>
                        <td>
                            <a class="find-btn" href="${pageContext.request.contextPath}/users/${user.id}.do">
                                <c:out value="${user.id}"/></a>
                        </td>
                        <td><c:out value="${user.userId}"/></td>
                        <td><c:out value="${user.name}"/></td>
                        <td><c:out value="${user.username}"/></td>
                        <td><c:out value="${user.depotCode}"/></td>
                        <td><c:out value="${user.depotName}"/></td>
                        <td><c:out value="${user.status.name}"/></td>
                        <td>
                            <a class="find-btn" href="${pageContext.request.contextPath}/users/${user.id}.do"><i class="search icon"></i>查看</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </div>
    </jsp:body>
</manage:page>
